package zhoufu.sz.sanxiao_check.models;

import android.text.TextUtils;

/**
 * User RCP
 * email ruancaipu@gmail.com
 * Date 2016/7/26
 */
public class BuildStreetInfo
{
    private String CID;//社区ID
    private String RID;//门店ID
    private String SID;//场所ID(添加传0)
    private int    Reseau_Type;//网格ID
    private int    District_ID;//片区ID
    private String Name;//场所名称
    private String Type;//场所性质( 1 小档口 2 小作坊 3 小娱乐场所)
    private String Address;//地址
    private String Business;//经营范围
    private String Has_Business;//营业执照
    private String Acreage;//面积
    private String Doorplate;//门牌号
    private String Building_No;//房屋编号
    private String Run_Name;//经营者
    private String Run_Phone;//经营者电话
    private String Owner_Name;//业主姓名
    private String Phone;//业主电话
    private double Place_x;//经度
    private double place_y;//纬度
    private String UserID;//录入用户
    private String IsLicense;
    String Emergency_Num = "0";//应急灯
    String Extinguisher_Num = "0";//灭火器
    String  Alertor_Num = "0";//报警器数量
    String Safe_Num = "0";//安全出口批示牌
    String Escape_Num = "0";//逃生出口
    String Exit_Num = "0";//其它
    String Owner_Address = "无";//:业主地址
    String Run_Address = "无";//:经营者地址
    String Safety_Name = "无";//:安全责任人
    String Safety_Phone = "无";//:安全责任人电话
    String Grade;//:
    String Layer = "无";//:
    String Gas_Num = "0";//燃气数量
    String Fire_Name = "无";//:消防责任人
    String Fire_Phone= "无";//:消防电话

    public void setInfo(StreetInfoModel model)
    {
        setBuilding_No(model.getBuilding_No());
        setSID(TextUtils.isEmpty(model.getSID()) ? "0" : model.getSID());
        setAcreage(model.getAcreage());
        setAddress(model.getAddress());
        setBusiness(model.getBusiness());
        setCID(User.readUser().getCharge_ID());
        setDistrict_ID(model.getDistrict_ID());
        setDoorplate(getData(model.getDoorplate(),"无"));
        setHas_Business(getData(model.getHas_Business(),"无"));
        setName(model.getName());
        setOwner_Name(getData(model.getOwner_Name(),"无"));
        setPhone(getData(model.getPhone(),"无"));
        setPlace_x(model.getPlace_x());
        setPlace_y(model.getPlace_y());
        setReseau_Type(model.getReseau_Type());
        setRID(TextUtils.isEmpty(model.getRID()) ? "0" : model.getRID());
        setRun_Name(getData(model.getRun_Name(),"无"));
        setRun_Phone(getData(model.getRun_Phone(),"无"));
        setType(model.getType());
        setUserID(User.readUser().getID());
        setIsLicense(model.IsLicense);
        if(!TextUtils.isEmpty(model.Emergency_Num)) {
            this.Emergency_Num = model.Emergency_Num;//应急灯
        }
        if(!TextUtils.isEmpty(model.Extinguisher_Num)) {
            this.Extinguisher_Num = model.Extinguisher_Num;//灭火器
        }
        if(!TextUtils.isEmpty(model.Alertor_Num)) {
            this.Alertor_Num = model.Alertor_Num;//报警器数量
        }
        if(!TextUtils.isEmpty(model.Safe_Num)) {
            this.Safe_Num = model.Safe_Num;//安全出口批示牌
        }
        if(!TextUtils.isEmpty(model.Escape_Num)) {
            this.Escape_Num = model.Escape_Num;//逃生出口
        }
        if(!TextUtils.isEmpty(model.Exit_Num)) {
            this.Exit_Num = model.Exit_Num;//其它
        }
        this.Owner_Address = getData(model.Owner_Address,"无");//:业主地址
        this.Fire_Name = getData(model.Fire_Name,"无");//:场所消防管理责任人
        this.Fire_Phone = getData(model.Fire_Phone,"无");//:场所消防管理责任人电话
        this.Run_Address = getData(model.Run_Address,"无");//:经营者地址
        this.Safety_Name = getData(model.Safety_Name,"无");//:安全责任人
        this.Safety_Phone = getData(model.Safety_Phone,"无");//:安全责任人电话
        this.Grade = model.Grade;
        this.Layer = model.Layer;
        if(!TextUtils.isEmpty(model.Gas_Num)) {
            this.Gas_Num = model.Gas_Num;
        }

    }

    private String getData(String data,String defValue) {
        return TextUtils.isEmpty(data)?defValue:data;
    }

    public String getIsLicense()
    {
        return IsLicense;
    }

    public void setIsLicense(String isLicense)
    {
        IsLicense = isLicense;
    }

    public String getCID()
    {
        return CID;
    }

    public void setCID(String CID)
    {
        this.CID = CID;
    }

    public String getRID()
    {
        return RID;
    }

    public void setRID(String RID)
    {
        this.RID = RID;
    }

    public String getSID()
    {
        return SID;
    }

    public void setSID(String SID)
    {
        this.SID = SID;
    }

    public int getReseau_Type()
    {
        return Reseau_Type;
    }

    public void setReseau_Type(int reseau_Type)
    {
        Reseau_Type = reseau_Type;
    }

    public int getDistrict_ID()
    {
        return District_ID;
    }

    public void setDistrict_ID(int district_ID)
    {
        District_ID = district_ID;
    }

    public String getName()
    {
        return Name;
    }

    public void setName(String name)
    {
        Name = name;
    }

    public String getType()
    {
        return Type;
    }

    public void setType(String type)
    {
        Type = type;
    }

    public String getAddress()
    {
        return Address;
    }

    public void setAddress(String address)
    {
        Address = address;
    }

    public String getBusiness()
    {
        return Business;
    }

    public void setBusiness(String business)
    {
        Business = business;
    }

    public String getHas_Business()
    {
        return Has_Business;
    }

    public void setHas_Business(String has_Business)
    {
        Has_Business = has_Business;
    }

    public String getAcreage()
    {
        return Acreage;
    }

    public void setAcreage(String acreage)
    {
        Acreage = acreage;
    }

    public String getDoorplate()
    {
        return Doorplate;
    }

    public void setDoorplate(String doorplate)
    {
        Doorplate = doorplate;
    }

    public String getBuilding_No()
    {
        return Building_No;
    }

    public void setBuilding_No(String building_No)
    {
        Building_No = building_No;
    }

    public String getRun_Name()
    {
        return Run_Name;
    }

    public void setRun_Name(String run_Name)
    {
        Run_Name = run_Name;
    }

    public String getRun_Phone()
    {
        return Run_Phone;
    }

    public void setRun_Phone(String run_Phone)
    {
        Run_Phone = run_Phone;
    }

    public String getOwner_Name()
    {
        return Owner_Name;
    }

    public void setOwner_Name(String owner_Name)
    {
        Owner_Name = owner_Name;
    }

    public String getPhone()
    {
        return Phone;
    }

    public void setPhone(String phone)
    {
        Phone = phone;
    }

    public double getPlace_x()
    {
        return Place_x;
    }

    public void setPlace_x(double place_x)
    {
        Place_x = place_x;
    }

    public double getPlace_y()
    {
        return place_y;
    }

    public void setPlace_y(double place_y)
    {
        this.place_y = place_y;
    }

    public String getUserID()
    {
        return UserID;
    }

    public void setUserID(String userID)
    {
        UserID = userID;
    }
}
